<template>
  <div>
    <!-- <el-radio-group v-model="direction">
      <el-radio label="rtl">从右往左开</el-radio>
    </el-radio-group>-->

    <el-drawer
      size="50%"
      title="我是标题"
      :visible="isShow"
      :direction="direction"
      :before-close="handleClose"
    >
      <span>查看</span>
    </el-drawer>
  </div>
</template>

<script>
export default {
  name: 'view-page',
  props: {
    isShow: {
      type: Boolean,
      required: true,
    },
  },
  components: {},
  data() {
    return {
      drawer: false,
      direction: 'rtl',
    };
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    handleClose() {
      // this.isShow = false;  // 报错的原因：父通过props传子是单向数据流，不能直接改变父组件的变量
      // this.$emit('我想改变isShow的值')
      this.$emit('close');
    },
    show(articleId) {
      console.log('发生请求!! ! !!');
      console.log(articleId);
    },

  },
};
</script>

<style lang="less" scoped>
</style>
